package com.biz.primus.ms.commodity.trans;

import com.biz.primus.base.vo.IdNameVo;
import com.biz.primus.ms.commodity.dao.po.Product;
import com.google.common.base.Function;
import javax.annotation.Nullable;

public class Product2IdNameVo implements Function<Product,IdNameVo> {
    @Nullable
    @Override
    public IdNameVo apply(@Nullable Product product) {
        return new IdNameVo(product.getId().toString(),product.getName(),product.getProductCode());
    }
}
